<?php

namespace app\api\validate;

use think\Validate;

class ShopCarValidate extends Validate
{
    
    /**
     * 验证规则
     */
    protected $rule = [
        'openid'        => 'require',
        'goods_id'      => 'require',
        'sku_price_id'  => 'require',
        'goods_num'     => 'require',
        'id'            => 'require',
    ];
    
    /**
     * 验证场景
     */
    protected $scene = [
        'addShopCar' => [
            'openid'        => 'require',
            'goods_id'      => 'require',
            'sku_price_id'  => 'require',
            'goods_num'     => 'require',
        ],
        'shopCarDec' => [
            'openid'        => 'require',
            'goods_id'      => 'require',
            'id'            => 'require',
        ],
        'updateShopCarSefic' => [
            'openid'        => 'require',
            'goods_id'      => 'require',
            'id'            => 'require',
            'sku_price_id'  => 'require',
        ],
        'openid' => [
            'openid' => 'require',
        ],
        'shopCarOpent' => [
            'openid'        => 'require',
            'goods_num'     => 'require',
            'id'            => 'require',
        ],
    ];
    
}
